import request from '@/utils/request'

const caseApi = {
  list: '/case/list',
  creat: '/case/add',
  edit: '/case/change',
  Delete: '/case/delete',
}

/**
 * caseList func
 * parameter: {
 *     username: '',
 *     password: '',
 *     captcha: '12345'
 * }
 * @param parameter
 * @returns {*}
 */
// 获取case列表
export function caseList () {
  return request({
    url: caseApi.list,
    method: 'get',
		headers: {
		  'Content-Type': 'application/json;charset=UTF-8'
		},
  })
}
// 创建case
export function caseCreat (parameter) {
  return request({
    url: caseApi.creat,
    method: 'post',
		headers: {
		  'Content-Type': 'application/json;charset=UTF-8'
		},
    params: parameter,
  })
}
// 编辑case
export function caseEdit (parameter) {
  return request({
    url: caseApi.edit,
    method: 'post',
		headers: {
		  'Content-Type': 'application/json;charset=UTF-8'
		},
    params: parameter,
  })
}
// 删除case
export function caseDelete (parameter) {
  return request({
    url: caseApi.Delete,
    method: 'post',
		headers: {
		  'Content-Type': 'application/json;charset=UTF-8'
		},
    params: parameter,
  })
}

